% Value that sets E seller surplus marginal seller equal to 0
% Corresponds to equation 17 in the paper.
function[eSo]=eSofunc(screeningvalue,CDFu0star,lambdastarposr,cL,cR,thetas,pdfmat,pismat,v0vec,PAR)

   surplusfunc = @(eSo) (Piseller(screeningvalue,CDFu0star,CDFu0star,cL+eSo,0,cR,thetas,0,0,pdfmat,pismat,0,v0vec,0,PAR,lambdastarposr)).^2;
   eSo         = fminbnd(surplusfunc,-200,200,optimset('TolFun',1e-3));

end